From: Zeeshan Ali (Khattak) Date: Mon, 31 Mar 2014 17:26:04 +0000 (+0100) Subject: location: Don't hide location menu X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2557 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0117fcb0e78a66a8d38df6918db543ca9ccafd51;p=gnome-shell.git location: Don't hide location menu If geoclue reports that we can't aquire location, we hide the menu. This will typically happen when user is offline (and doesn't have a 3G modem). This is likely not what we want since this like a temporary situation and user would want the ability to toggle geolocation still even if its currently not possible any applications to query the location. https://bugzilla.gnome.org/show_bug.cgi?id=727398 --- diff --git a/js/ui/status/location.js b/js/ui/status/location.js index 211137976..8ae76330b 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -123,7 +123,7 @@ const Indicator = new Lang.Class({ this._propertiesChangedId = this._proxy.connect('g-properties-changed', Lang.bind(this, this._onGeocluePropsChanged)); - this._updateMenu(); + this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; this._syncIndicator(); this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered)); @@ -187,17 +187,12 @@ const Indicator = new Lang.Class({ this._agent.emit_property_changed('MaxAccuracyLevel', variant); }, - _updateMenu: function() { - this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; - this.menu.actor.visible = (this._availableAccuracyLevel != 0); - }, - _onGeocluePropsChanged: function(proxy, properties) { let unpacked = properties.deep_unpack(); if ("InUse" in unpacked) this._syncIndicator(); if ("AvailableAccuracyLevel" in unpacked) - this._updateMenu(); + this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; } });